package com.yami.shop.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yami.shop.bean.model.Blog;
import com.yami.shop.bean.model.UserBrowseHistory;
import com.yami.shop.common.util.PageParam;
import com.yami.shop.dao.UserBrowseHistoryMapper;
import com.yami.shop.service.UserBrowseHistoryService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author wxf
 * @date 2023/5/16 17:54
 */
@Service
@AllArgsConstructor
public class UserBrowseHistoryServiceImpl extends ServiceImpl<UserBrowseHistoryMapper, UserBrowseHistory> implements UserBrowseHistoryService {

    private final UserBrowseHistoryMapper userBrowseHistoryMapper;

    @Override
    public void deteleByUserIdAndProdId(String userId, String type, List<Long> ids) {
        userBrowseHistoryMapper.deteleByUserIdAndProdId(userId, type, ids);
    }

    @Override
    public IPage<Blog> pageUserBrowseHistory(PageParam<Blog> page, String currentId, String content) {
        return userBrowseHistoryMapper.pageUserBrowseHistory(page, currentId, content);
    }
}
